<template>
	<view class="details">
		<view class="shop-information">
			<view class="top">
				<image class="top-img" src="../../../static/mine/shop/dianpu.png" mode=""></image>
				<text class="top-title">南极人洗手液</text>
			</view>
			<view class="middle">
				<image class="middle-img" src="../../../static/index/phone.png" mode=""></image>
				<view class="middle-right">
					<text class="title">植物护洗手液免洗漱75%酒出生地火车vi是</text>
					<text class="specs">免洗手凝胶80ml<text class="num">3瓶</text></text>
					<view class="middle-btn">
						<text class="shipping">免运费</text>
						<text class="shipping">私定精选</text>
					</view>
				</view>
			</view>
			<view class="price">
				<view class="price-box" v-show="isOpen">
					<view class="one">
						<view class="one-box">
							<text>商品总价</text>
							<text>商品所需积分</text>
						</view>
						
						<text class="text">3000积分</text>
					</view>
					<view class="one">
						<view class="one-box">
							<text>运费</text>
							<text>运费（快递费）</text>
						</view>
						<text class="text">￥0.00</text>
					</view>
					<view class="one">
						<view class="one-box">
							<text>活动减免</text>
							<text>满减优惠</text>
						</view>
						<text class="text" style="color: #FF7200;">-300积分</text>
					</view>
				</view>
				<view class="actual-price">
					<text style="color: #333333;font-size: 32rpx;">实付积分：</text><text style="color: #FF7200;font-size: 40rpx;">2700积分</text>
					<image @click="open" style="width: 32rpx;height: 16rpx;margin-top: 10rpx;margin-left: 10rpx;" src="../../../static/mine/bottomjiantou.png" mode="" v-if="!isOpen"></image>
					<image @click="open" style="width: 32rpx;height: 16rpx;margin-top: 10rpx;margin-left: 10rpx;" src="../../../static/mine/topjiantou.png" mode="" v-else></image>
				</view>
			</view>
		</view>
		<view class="order-information">
			<view class="order-top">
				<view class="order-top-title-box">
					<text class="order-top-title">订单信息</text>
					<view class="order-box">
						<text style="font-size: 14px;font-family: Source Han Sans CN;font-weight: 400;color: #999999;">查看更多</text>
						<image @click="open2" style="width: 32rpx;height: 16rpx;margin-top: 10rpx;margin-left: 10rpx;" src="../../../static/mine/topjiantou.png" mode="" v-if="!isOpen2"></image>
						<image @click="open2" style="width: 32rpx;height: 16rpx;margin-top: 10rpx;margin-left: 10rpx;" src="../../../static/mine/bottomjiantou.png" mode="" v-else></image>
					</view>
				</view>
				<view class="order-number">
					<view class="order-box">
						<text>订单编号：</text>
						<text>20231213323233693</text>
					</view>
					<text class="copy">复制</text>
				</view>
				<view class="order-address">
					<text>收获地址：</text>
					<text style="white-space:nowrap;
					overflow:hidden;
					text-overflow:ellipsis;
					width: 400rpx;">四川省成都市中海国际中心A座1304545454</text>
				</view>
			</view>
			<view class="order-bottom" v-show="isOpen2">
				<view class="order-address">
					<text>买家备注：</text>
					<text>暂无</text>
				</view>
				<view class="order-address">
					<text>创建时间：</text>
					<text>2021-11-16 11：12：05</text>
				</view>
				<view class="order-address">
					<text>支付时间：</text>
					<text>2021-11-16 12：12：05</text>
				</view>
			</view>
		</view>
		<view class="recommend">
			<view class="recommend-title" style="background-image: url(../../../static/mine/henxian.png);">
				<text>为你推荐</text>
			</view>
			<view class="recommend-box">
				<view class="recommend-shop-box" v-for="(item,index) in shopList" :key='index'>
					    <image style="width: 100%;height: 298rpx;border-radius: 20rpx 20rpx 0 0;" :src="item.img" mode=""></image> 
						<text class="recommend-shop-box-title">{{item.text}}</text>
						<view class="integral">
							<text>{{item.integral}}积分</text>
							<text>{{index.numPeople}}人已兑换</text>
						</view>
				</view>
			</view>
		</view>
		<view class="btn-bottom">
			<text>提醒发货</text>
			<text @click="modifyAddress">修改地址</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isOpen:false,//商品信息折叠
				isOpen2:false,//商品信息折叠
				shopList:[{
					img:require('../../../static/mine/maoyi.png'),text:'潮牌国潮港风长针衫高领毛衣 休闲修身款',integral:'3000',numPeople:'63'
				},{
					img:require('../../../static/mine/maoyi.png'),text:'潮牌国潮港风长针衫高领毛衣 休闲修身款',integral:'3000',numPeople:'63'
				}]
			};
		},
		methods:{
			open(){
				this.isOpen = !this.isOpen
			},
			open2(){
				this.isOpen2 = !this.isOpen2
			},
			modifyAddress(){
				uni.navigateTo({
					url:'/myPackageA/mine/details/modifyaddress'
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.details{
		padding-bottom: 100rpx;
	}
	.btn-bottom{
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 88rpx;
		background-color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		text{
			width: 160rpx;
			height: 60rpx;
			background: #FFFFFF;
			border: 2rpx solid #999999;
			opacity: 1;
			border-radius: 34rpx;
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			text-align: center;
			line-height: 60rpx;
			color: #999999;
			margin-right: 20rpx;
		}
	}
	.recommend{
		margin-top:60rpx ;
		width: 100%;
		padding: 0 40rpx;
		.recommend-box{
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			.recommend-shop-box{
				padding-bottom: 20rpx;
				width: 45%;
				height: auto;
				background-color: #FFFFFF;
				border-radius:20rpx ;
				margin-bottom: 40rpx;
				display: flex;
				flex-direction: column;
				.recommend-shop-box-title{
					font-size: 28rpx;
					font-family: Source Han Sans CN;
					font-weight: bold;
					color: #333333;
					padding: 20rpx;
				}
				.integral{
					padding: 0 20rpx;
					text:first-child{
						font-size: 28rpx;
						font-family: Source Han Sans CN;
						font-weight: 400;
						color: #FF7200;
					}
					text:last-child{
						font-size: 20rpx;
						font-family: Source Han Sans CN;
						font-weight: 400;
						color: #999999;
						margin-left: 20rpx;
					}
				}
			}
		}
		.recommend-title{
			margin-bottom: 40rpx;
			background-position: 50% 50%;
			background-repeat: no-repeat;
			background-size: 172px 2px;
			font-size: 32rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #999999;
			display: flex;
			justify-content: center;
			align-items: center;
		}
	}
	.order-address{
		margin-top: 20rpx;
		display: flex;
		align-items: center;
		font-size: 16px;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #333333;
		text:first-child{
			width: 190rpx;
		}
	}
	.copy{
		font-size: 28rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #FF7200;
		font-weight: bold;

	}
	.order-number{
		display: flex;
		justify-content: space-between;
		.order-box{
			font-size: 32rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #333333;
		}
	}
	.order-information{
		width: 100%;
		height: auto;
		background: #FFFFFF;
		border-radius: 20rpx;
		padding: 30rpx;
		.order-top{
			.order-top-title-box{
				display: flex;
				justify-content: space-between;
				margin-bottom: 40rpx;
				.order-top-title{
					font-size: 36rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #333333;
				}
			}
		}
	}
.shop-information{
	margin: 44rpx 0 70rpx;
	width: 100%;
	height: auto;
	background: #FFFFFF;
	opacity: 1;
	border-radius: 20rpx;
	padding: 30rpx;
	.top{
		padding-bottom: 28rpx;
		display: flex;
		.top-img{
			width: 50rpx;
			height: 46rpx;
		}
		.top-title{
			font-size: 32rpx;
			font-family: Source Han Sans CN;
			font-weight: 500;
			color: #333333;
			margin-left: 12rpx;
		}
		.top-active{
			font-size: 32rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #FF7200;
			margin-left: 160rpx;
		}
	}
	.middle{
		display: flex;
		.middle-img{
			width: 160rpx;
			height: 160rpx;
		}
		.middle-right{
			width: 450rpx;
			margin-left: 20rpx;
			display: flex;
			flex-direction: column;
			.title{
				font-size: 32rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #333333;
				//单行省略号
				white-space:nowrap;
				overflow:hidden;
				text-overflow:ellipsis;
			}
			.specs{
				font-size: 28rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #999999;
				margin: 20rpx 0;
				.num{
					margin-left: 20rpx;
				}
			}
			.middle-btn{
				display: flex;
				.shipping{
					padding: 5rpx 8rpx;
					height: 30rpx;
					line-height: 30rpx;
					text-align: center;
					background: #FFFFFF;
					border: 1px solid #FF7200;
					opacity: 1;
					border-radius: 8rpx;
					margin-right: 28rpx;
					font-size: 20rpx;
					font-family: Source Han Sans CN;
					font-weight: 400;
					color: #FF7200;
					display: flex;
					justify-content: center;
					align-items: center;
				}
			}
			
		}
	}
}
.price{
	.actual-price{
		display: flex;
		justify-content: flex-end;
		align-items: center;
	}
}
.price-box{
	margin-top: 40rpx;
	.one{
		width: 100%;
		padding-left: 120rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 20rpx;
		.one-box{
			display: flex;
			justify-content: space-between;
			text:first-child{
				display: flex;
				align-items: center;
				justify-content: center;
				padding: 10rpx;
				font-size: 32rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #333333;
				text-align: right;
			}
			text:nth-child(2){
				font-size: 28rpx;
				font-family: Source Han Sans CN;
				font-weight: 400;
				color: #999999;
				margin-left: 20rpx;
			}
		}
		.text{
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #999999;
			text-align: right;
		}
	}
}
</style>
